package com.atguigu.zy.interview.jvm.gc;

/**
 * @author Jungle
 * @create 2022-09-03 23:37
 */
public class HelloGc {
    public static void main(String[] args) throws InterruptedException {
        //返回java虚拟机中的内存变量
        //long totalMemory = Runtime.getRuntime().totalMemory();  //默认初始堆内存是总物理内存的1/64
        ////返回java虚拟机试图使用的最大内存量
        //long maxMemory = Runtime.getRuntime().maxMemory();  //最大内存是物理内存的1/4
        //System.out.println("TOTAL_MEMORY(-Xms) = " + totalMemory + " (字节) 、" +(totalMemory / (double)1024 / 1024 + "MB"));
        //System.out.println("MAX_MEMORY(-Xmx) = " + maxMemory + " (字节) 、" +(maxMemory / (double)1024 / 1024 + "MB"));
        System.out.println("***************hello GC");
        //byte[] bytes = new byte[12*1024*1024];
        Thread.sleep(Integer.MAX_VALUE);


    }
}
